<div class="modal-header">
    <h3 class="modal-title">添加指标</h3>
</div>
<div class="modal-body">
    <form class="form-horizontal form-content chart-add-container" name="chart_Form">
        <div class="form-group">
            <label for="chart_name" class="control-label col-xs-2">指标名称</label>
            <div class="col-xs-10">
                <input type="text" ng-model="item.chart_name" class="form-control"
                       required name="chart_name" id="chart_name" placeholder="指标名称">
            </div>
        </div>

        <div ng-repeat="typeName in types" class="form-group">
            <label class="control-label col-xs-2 type-select-label" ng-bind="typeName" ng-click="toggleType(typeName)"></label>
            <div class="col-xs-10 type-selected"  ng-hide="!(selectType == typeName)">
                <li class="charts-type-select" ng-repeat="chart in charts | filter:{ type: typeName }" ng-click="toggle(chart)" ng-class="{'chart-type-selected':chart.uid == item.chart_type_id}">
                    <a><span class="block-span" title="{{chart.desc}}"></span></a>
                    <img ng-src="{{chart.image}}"/>
                    <div class="charts-type-name" title="{{chart.desc}}">{{chart.name}}</div>
                </li>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-primary" type="button"
            ng-disabled="chart_Form.chart_name.$invalid || !item.chart_type_id"
            ng-click="ok()">确认</button>
    <button class="btn btn-warning" type="button" ng-click="cancel()">取消</button>
</div>